home *** CD-ROM | disk | FTP | other *** search
/ Interactive Preview: Enemy of the State / Interactive Preview: Enemy of the State.iso / pc / main.dxr / 00489_mov control.ls < prev    next >
Encoding:
Text File  |  1998-11-19  |  819 b   |  30 lines

  1. property pH, pMove
  2.  
  3. on beginSprite me
  4.   set pH to the locH of sprite the spriteNum of me
  5.   set pMove to float(260) / float(the duration of member "NATURE")
  6. end
  7.  
  8. on exitFrame me
  9.   set the locH of sprite the spriteNum of me to (the movieTime of sprite 5 * pMove) + pH
  10.   updateStage()
  11. end
  12.  
  13. on mouseDown me
  14.   repeat while the stillDown
  15.     if (the mouseH < 454) and (the mouseH > 187) then
  16.       set the locH of sprite the spriteNum of me to the mouseH
  17.       set mf to (the locH of sprite the spriteNum of me - pH) / pMove
  18.       set the movieTime of sprite 5 to mf
  19.       updateStage()
  20.       next repeat
  21.     end if
  22.     if the mouseH < 187 then
  23.       set the locH of sprite the spriteNum of me to 187
  24.     end if
  25.     if the mouseH > 454 then
  26.       set the locH of sprite the spriteNum of me to 454
  27.     end if
  28.   end repeat
  29. end
  30.